Bug fix for messaging