resize box bug fix