fix variable renaming