I had the same problem with my 95ZJ. It turned out to be the sensor under the hood. Mine is located on the pasenger side. It was pitted which caused a poor contact. This is the way I found it ( and by the way- I don't know if the Liberty has the same diagnostic routine-). There is a routine you can kick off by turning the ignition key on and off a specific amount of times then opening and closing each door,liftgate and hood one at a time. You will hear one beep for everytime you open and close a door. I heard no beep when I opened the hood. That's how I knew the problem was the hood open/close switch.