fix resize and multiple attachements