Correcting bad comparison