fixed variable errors