fixed variable issues