moved pageview before alert