I have a 1998 Jeep Cherokee. The idle is a little rough, and when accelerating the RPMs jump around…

I have a 1998 Jeep Cherokee. The idle is a little rough, and when accelerating the RPMs jump around and the car jolts. There is an fairly clicking sound when the bucks. It also is throwing a P1391 code (Intermittent Cam or Crank Position Sensor). I have replaced both the distributor and the Cam sensor.
Any ideas?

false