bugfixes for message sending