changed my custom router to page.js and implemented a getInitialState middleware for it