Very weird overheating problem

Okay, my friend has a b16a in his crx. Started overheating. We’ve replaced the thermostat and radiator. The car still overheated a little, so he’s been running with no thermostat. That dropped the temp down to normal. But when he is idling and cuts on his headlights, the temp gauge goes all the way up. Then when he hits the hazards, the needle starts bouncing? WTF? Not sure where to even start looking. Thanks for the help.