Sorting issues with package importing