             true ->
               v_diff2 = Map.delete(v_diff, "_t")
               v_map
-              |> Stream.with_index
-              |> Stream.map(fn({v, k}) -> {to_string(k),v} end)
+              |> Enum.with_index
+              |> Enum.map(fn({v, k}) -> {to_string(k),v} end)
               |> Enum.into(%{})
               |> do_patch_list(%{}, v_diff2, 0)
             false -> do_patch(v_map, v_diff)

        false -> {k, [Map.get(map2, k)]}
      end
    end)
    |> Stream.filter(fn({_,v}) -> v !== nil end)
    |> Enum.into(%{})
  end


  defp do_diff(map1, map2) when is_map(map1) and is_map(map2) do
    keys_non_uniq = Enum.concat(Map.keys(map1), Map.keys(map2))
    keys_non_uniq
    |> Enum.uniq
    |> Enum.map(fn(k) ->
      case Map.has_key?(map1, k) do
        true ->
          case Map.has_key?(map2, k) do
