Slight improvement to resizing