Fix bug in router.