Bug in resizing