fix the bug in getting neighboring routers.