Modify router to get it working properly