I had the same problem. I bought a new sensor but before replacing it, I inspected the wiring and connector. I moved the wires around and taped them up. I disconnected the batery for 15 minutes to reset the PCM and the problem went away. I was able to manipulate the wires to convince myself that it was a loose wire. Never replaced the temperature element and haven't had the problem since. Fans go on due to loss of connectivity with temperature sensor, safe mode.
Good luck and let me know how you make out.