Bug fix

Fix crash, when count of messages = 0