resizing bug fix