Fixed flickering on first page view/refresh