More than likely you have one of two problems.
1) You could have a vacuum leak somewhere in the car. The most common problem is the vacuum leak at the line that goes under the battery tray to the vacuum reservoir.
2) You may have a problem with the blend flap potentiometer. If it gives a false reading, the heat and or A/C modes will not work correctly.
ASE CERTIFIED MASTER AUTO TECHNICIAN
MERCEDES SPECIALIST 11 YRS