Wrong variable name bug