clean up casts