bugfix for renaming vars