engine shakes

alright, I recently changed out a "vanos" unit in my bmw 1999 328i. the engine dying symtoms went away, however, the car still has "rough" startups.
basically, the engine shakes during the warmup process, a minute later, the check engine light comes up. I have noticed, turning the engine off and restarting it, the engine doesnt shake anymore, the light will stay on but goes away after a day or so by itself. any help?
Message posted via CarKB.com
  Click to see the full signature.

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
Add image file

Motorsforum.com is a website by car enthusiasts for car enthusiasts. It is not affiliated with any of the car or spare part manufacturers or car dealers discussed here. All logos and trade names are the property of their respective owners.