Fixes most of message generation