Fixed using minOccurs for attribute, added test