bug fix with saving when chnage mode