fix bugs of creating/deleting routers