fixed variable name bug --KW