fix bug when reconfiging