Sort before limit