fixed js messages generation