correct resizing