Fixing null message bug