Jeep Grand Cherokee Check Engine Light Issue?

I own a 96 Grand Cherokee with an In-Line 6 cylinder with auto trans. The check engine light comes on as soon as I turn on the head lights. Further, although the engine is not over heating, the engine over-heat warning bulb to the extreme right of the analog temp gauge lights with the check engine light. By... show more I own a 96 Grand Cherokee with an In-Line 6 cylinder with auto trans. The check engine light comes on as soon as I turn on the head lights. Further, although the engine is not over heating, the engine over-heat warning bulb to the extreme right of the analog temp gauge lights with the check engine light. By disconnecting / reconnecting the battery, the check engine light resets and remain off until I turn on the head lights. If I don't turn on the head lights, check engine light remains off. My guess is that there is a short in the electrical harness or possibly a bad instrument cluster bulb. Also I did the self diagnostics via turning the ignition switch on/off for 2 cycles the back on so to display a code. Two codes come up: 12 and 21 indicating a bad O2 sensor and the other indicating that power was lost to the PCM. But due to the behavior of when the Check Engine light being triggered by turning on head lights, I'm thinking it's a wiring issue. Thanks in advance for your help
9 answers 9