fixed problems with createMessage