fix bad comparison