Fix the size sorting bug