fix sending of messages
Merge remote-tracking branch 'upstream/master'