Changed the comparison logic without changing semantics