hi guys , not sure why this happens can someone advise

problem - RGB LED has 3 outputs from Pic connected to it and assigned variables , PWR_LOWLED(red) , PWR_LED (blue),OK_LED(green)

In the follow code , all works ok as expected , the PWR_LOWLED , is toggled , the PWR_LED is turned off

Code:
 if T0Count1 = Flash_rate  and IR_RX_PWR_Low = 1 then 
        toggle PWR_LOWLED                   ' Flash PWR_LOWLED 
        pwr_led =0                           ' turn off PWR_LED
        T0Count1=0                          ' clear counter 
     endif
However in this code when i put the command to turn off the PWR_LED = 0 before the toggle PWR_LOWLED command , the PWR_LED remains on , and i dont see why it is the case

any advise on why


Regards

Sheldon
Code:
 if T0Count1 = Flash_rate  and IR_RX_PWR_Low = 1 then 
         pwr_led =0                          ' turn off PWR_LED
        toggle PWR_LOWLED                   ' Flash PWR_LOWLED 
       T0Count1=0                          ' clear counter 
     endif