Fix arrays and nested arrays