Short patch for sanitizing grid data.