Bugfix for 'Sort by'