Fix a bug with same attachment names