Fix sorted patterns output (-s option)