fix clearing changes with nested arrays