Fixed bugs in message display and creation