Sorting bug with rendering fixed