Fix an error with the new created attachments