fix initial pageview logic