fix #8

fix bug when toggle router