fixed bad comparison