A few weeks ago, my son's 2007 Pontiac g5 with 2.2L engine overheated. He said he pulled over to the nearest garage. We had it towed to the local mechanic who replaced the radiator fan because it wasnt running. My son picked it up and it had difficulty starting. Turned over quite a bit before starting. Never had that issue prior to the overheating. He drove it to work and had to pull over because the engine over heated. We had it towed home since I had some time to look at it. Codes were as follows, p0340 and p0341 faults, P0128 pending. I changed the engine coolant sensor and thermostat. Also changed the camshaft position sensor. Started her up, and tested it for a couple trips. Cooling issue is fixed. It has difficulty starting half the time and throws the p0340 fault and pending codes intermittently. Tested the voltage going to the sensor, and it reads 5vdc as I believe it's supposed to. Connection at the sensor looks clean. The wires that I can see for about 3-4 inches before they go into the harness look good. Suggestions?