Fix messages generation