Correct the condition of returning page urls