fixing sorting bug