Fixing parsing of ArrayCollection and array