resizing finally works fine