Added a check for uninitialised routers