Fixed typo in adding of the attachments

Each attachment without the name (not sure it's possible) will have same generated name `attachment0` without this fix.