Fixed a bug when removing casts