Fixed bug in message loading