fixing sorting bug?