Fix assertion error in RouterFactory. #206