Remove casts that are no longer needed