fixing a variable name bug