Fixed an issue regarding writing out, it was caused by a nameIndex never being assigned to an Attribute.