Fix casts