bug fix in router unregister