Fix a bug with is_less and is_greater functions