fix the bug that fails pagination if no parameters in url