I thought I had this problem on my XJ, but it turned out to be a bad guage cluster. When I was looking into it, here was a service bulletin that replaced the elctircal connection that goes to the cluster. If you google it you can find the part number. I think it was under $15 from the Jeep dealer and it took about 15 minutes to install. You will need to cut and connect all the wires, but it is not as difficult as it looks. A little heat shrink will make it good as new.
Good Luck.