Several threads on this subject so worth a search. BMW did a dealer bulletin about the issue of the roof not connecting with the latch when in the open position with a minor modification suggested. Mine definately connects with a latch on opening (pre facelift) but on post facelift this latch has been ommitted.
Here's the link to the BMW TIS modification;
http://www.bmwtis.net/tsb/bulletins/bulletin_graphic_temp/B540302g.htm