   end
 
   # Page
-  defp decode_result_response(<<0x0002::32-signed>> <> buffer, query) do
+  defp decode_result_response(<<0x0002::32-signed, buffer::bits>>, query) do
     page = new_page(query)
     {page, buffer} = decode_metadata(buffer, page)
     content = decode_page_content(buffer, page.columns)

  end

  # SetKeyspace
  defp decode_result_response(<<0x0003::32-signed>> <> buffer, _query) do
    {keyspace, <<>>} = decode_string(buffer)
    %Xandra.SetKeyspace{keyspace: keyspace}
  end

  # Prepared
  defp decode_result_response(<<0x0004::32-signed>> <> buffer, %Prepared{} = prepared) do
    {id, buffer} = decode_string(buffer)
    {%{columns: bound_columns}, buffer} = decode_metadata(buffer, %Page{})
    {%{columns: result_columns}, <<>>} = decode_metadata(buffer, %Page{})
    %{prepared | id: id, bound_columns: bound_columns, result_columns: result_columns}
  end

  # SchemaChange
  defp decode_result_response(<<0x0005::32-signed>> <> buffer, _query) do
    {effect, buffer} = decode_string(buffer)
    {target, buffer} = decode_string(buffer)
    options = decode_change_options(buffer, target)
    %Xandra.SchemaChange{effect: effect, target: target, options: options}
  end

  end

  def decode_response(%Frame{kind: :supported, body: body}, nil) do
    {value, <<>>} = decode_string_multimap(body)
    value
  end

  def decode_response(%Frame{kind: :event, body: body}, nil) do
    decode_string(event <- body)
    "STATUS_CHANGE" = event
    decode_string(effect <- body)
    {address, port, <<>>} = decode_inet(body)
    %StatusChange{effect: effect, address: address, port: port}
  end

