change registration of mainpage to use lazy singleton instead.