I owned a E90 325 many years ago and from memory had a similar problem. For my car it was a broken wire under the shift boot. The wires are very thin and with moving the shifter into DS and M they can break. Simple inexpensive fix, link below.
http://www.e90post.com/forums/showthread.php?t=808056