Added validation of id on outgoing messages.