fix a bug in router.addMaster.