fixed writing of grid stuff so both x and lon aren't written