fixes bug in the message creation