Fix for teardown of the internal routers

Added some fixes in order to proceed correctly with the
teardown of those internal routers