Remove sorting args after main query Closes #3969