So first off thank you for reading my post . I bought this 2005 Dakota 4x4 4.7 two years ago and it was a great truck for the 4 months I drove it . I lent it to my GF son as I had another truck at the time. He ran the Dakota with no oil and the #7 rod broke and locked the engine. A year later I got the money and time to replace the motor. First obstacle was to unlock the motor to get to the torque converter bolts. Then the tailgate and air intake cover say V8 Magnum but the vin number shows it a standard 4.7 and I inspected the cams and didn't have the HO notch. So I ordered a 4.7 with the vin number and got it installed and started 3 days ago. It ran great for the first day with no mis . The second day I had idling charging the AC and I got a check engine light turn on for cylinder #7 misfire . I moved the coil and plug to #1 cleared the code and it can back. Then yesterday the 3rd day running and 60 miles on the motor I got Crankshaft position sensor A code . I had bought a new one from Amazon and I went and bought another new one at Autozone . The Autozone CSPS would run for 30-45 seconds and shut off. I replaced my Amazon sensor and it would run but still had a mis. Got a second one from Autozone and did the same as the first one they sold me . Took it back and got my money back and went to Oriley and got one . The truck runs fine until at a stop and can feel it start to mis and I got the P307 #7 misfire again. I cleared the code and took it on the highway for 20 miles and it ran like a champ! After exiting the highway and waiting at the light it was running smooth and then started to mis slightly. Now home no codes are present but running rough at idle . I'm sure if I let it sit in the driveway idling it will get the P307 again. Any suggestions would be greatly appreciated.