Fixes to renaming of casts.