Fix escaping in transmit function. Reported and corrected by Alberto.