fixed variable def bug