fixing error of missing sort param in query view