           else
             {result, injected} = case find_attribute(tag, attribute) do
               nil -> {:ok, {:tag, add_attribute(tag, attribute)}}
-              found_attr -> {found_attr, [head | acc]}
+              found_attr -> {found_attr, head}
             end
             do_inject(tail, attribute, opened, result, [injected | acc])
           end

      {:naked, tag} -> # naked can be only at the end
        {result, injected} = case find_attribute(tag, attribute) do
          nil -> {:ok, {:naked, add_attribute(tag, attribute)}}
          found_attr -> {found_attr, [head | acc]}
        end
        do_inject(tail, attribute, opened, result, [injected | acc])
      {:tag, "/" <> tag} ->

      |> deep_reverse()
      |> do_inject(attribute, [], :not_found, [])
    acc = tokenized_to_html(acc)
    case found do
      result when is_atom(result) -> {result, acc, attribute}
      result when is_binary(result) -> {:already_there, acc, result}
    end
  end

