Problems with unplugged Duemilanove

Hey guys, I'm a total newbie to controllers and programming, though have some experience with electronics. I'm trying to make an extremely easy project using arduino Duemilanove a LM35 sensor and bunch of relays. Arduino should start cooling when temperature exceeds the threshold. And it all seems working UNTIL I unplug arduino from USB. It just sets the relay pin HIGH and won't turn it off.

float temperature;                        
int sensorPin = 2;                        // LM35
int startTemp = 34;                         // Treshold

void setup()

void loop()
  temperature = analogRead(sensorPin);    
  temperature = temperature*0.488;        

    if (temperature>=startTemp){  
 digitalWrite(2, HIGH);     
    else {


I'm sure there is an easy explanation. Can you help me?

How are the relay and sensor powered? From there own supply or from the Duemilanove?

since its 12 v relays, its powered with an external supply with gnd connected to arduino and to the powersupply.
LM35 is powered with 5 v arduino output . GND is common as well.

Ok so then my next question is, what is the value of "temperature" when the Duemilanove is not powered by USB? if temperature is greater or equal to startTemp, make relay high.

You need to find out what temperature equals.