fix bug in comparations operations