Fixing bug for modifiable casts