Fix bug when surfing directly to the first page.