Fix issue with no sort fields