Some fixes in message sending.