Fixed bug in parsing sort parameter.