Fix router registration bugs.