Improved sort handling on query request builder