Bug fix for empty message crash