Fix paths and sorting