Implement --no-sort options with some fixes