next sorting - fixed error with no sort on first load