Incorrect variable used