Hi, you have a faulty thermostat and possibly a blocked heater tap, the heater tap is at the back of the engine mounted to the fire wall on the inlet manifold side. if you remove it and inspect it you will see that the rubber gasket inside has deformed and block the outlets, can be stripped and cleaned outor replaced to fix the problem.
As for the running cold, the themostat is opening to soon and allowing the engine to run really cold, while at a stand still there is not enough air passing through the radiator and allows the engine to get a bit more heat into it. The thermostat is in the housing at the front of the engine.hope this helps.
BMW Technician
18 yrs as an auto technician 8 yrs with BMW,In England, Australia and New Zealand. Part Time tutor