fix bug of change box type