fix attachments add and delete