fix delete attachments when update