Fix renaming of attributes and variables