Fixed bug in messaging system.