fix enumeration order for arrays