fix bug calling pageview twice