fixed issue with setting vars only changing last used object