fix paper sorting