A small addition to pesuazo's tips:
There is a small pinhole on the thermostat that assists in evacuating air in the system. Make sure the thermostat is oriented in such a manner that the pinhole is at the highest position of the housing.
Actually, this isn't too critical, since the M104 configuration has the thermostat housing nearly level at every bolt location (three in your case)...but I place mine with the pinhole at about the 12 o'clock position (if you are facing the engine from the front)...
2009 ML350 (84K) - Family vehicle
2001 CLK430 Cabriolet (71K) - Wife's car
2005 BMW 645CI (124K) - My daily driver
2012 Mustang V6 (60K) - Daughter's car