fixed comparison checker