Fixed a bug with the message generation.