Fixed sorting of files