i have a e36 316i 1.8 engine, had exactly the same problem, engine wont idle, backfiring/misfiring, scanned it with diagnostic computer and error codes pointed to AFM, replaced it and it seems to have fixed it, i at first thought plugs/leads but was suprised to see AFM appear. Hope this helps.. Matt