BMW Repair: 1999 528i drags during acceleration and intermittenly stops completely, crankshaft sensor, crank shaft


Question
My 1999 528i drags while accelerating (As if it's running out of gas and is about to stop) and sometimes does not go beyond 2000 RPM and it intermittenly stops completely (Engine shuts-off in the middle of the road) but I am able to re-start it in a couple of minutes and everything works fine after that.

The check engine lite came up and the diagnostic code is 65 (Cam position sensor problem)
My mechanic reset the code and was not able to duplicate the problem. A day later the check engine lite came back again with the same code (65) and the car stopped in the middle of the road (Sudden complete engine shut-off) but re-started immediately in couple of minutes and was able to drive it to the mechanic without any problem or drag.

The battery is new and I put in a brand new General Module (Power Distributor) because the rear doors/trunk/windows were not functioning at all. Now they are working fine.

Should I just go ahead and replace both the Cam sensors (input and exhaust)
My mechanic thinks it's not the Cam sensors but the Crank Shaft Sensor and possibly the mixer or something which sits next to the Cam sensors.  

Any input greatly appreciated.  

Answer
Krishna, definately replace both Camshaft sensors and     O-rings. One of them is faulty and the other will follow soon. The engine computer looses fuel injection synchronization and can't figure out when to inject fuel or fire spark plugs. This makes the engine run rough and stall. Compare the old sensors to the new ones, you will notice a difference in the updated/improved design. I haven't seen a crankshaft sensor on one of these cars. This is a known problem. Remember to clear the faults. Please fill out a follow up survey if this helps.
-Evan