Fixed calls to the put method on mainAttributes, it has to be an instance of Attributes.Name instead of String