fix compare operations