fix attachement saving