Fixed missing casts