Remove unecessary casts.