fixed variable mess up