Fixed that sorting bug