Bugfix: Sort before map