bugfix for sending messages