Fixed up some castings.