Remove some casts