Fixed bug where sort flags a and d was reversed.