corrected resizing