Fix bug with rerendering new page