Remove unneeded casts