image resizing fixes