What LEVE said - all good!
Gad gauge and runs rough, then you rev it a bit, and it works fine again.
Try running a new ground wire directly from battery (-) to something solid metal under the dash. Make sure it's an integral part of the dash structure.
TJ's seem to have a ground problem - and it's very hard to find - sometimes a whole new dash harness helps, sometimes not.
The easy way I've found was just drag a new wire.