Fixed bug with adding new pages.