Fix query sorting.