record to_wire fixed