corrected variable name bug --KW