Fixed issue with search sorting