Change sorting of document