Sorting was not correct