fix re-render pages in debug mode