fix castings