Correct sorting at beginning