fix compare behavior