fixed variable name bugs