resize bug fix