Fix 500 error after adding sort_by at the last minute (oops)