Fix comparaison function for comparable elemets.