fix array decoding for recursive elements