RF24 weirdness

I am trying to write a simple program (en route to a more complex one) that reads the state of a digital pin and transmits one message with the RF24 to another receiver is the switch is high, and a different message if the switch is low. It also turns on the on board LED if the pin is high, and of if it is low. The problem that I am having is this: if I only transmit when the switch is high or when the switch is low, it works fine. If I try to transmit when the switch is either high or low, the LED stays high the whole time.
I am using two Arduino FIO boards and the RF24 library from maniacbug.github.com/RF24.

Here is my code:

#include <SPI.h>
#include "nRF24L01.h"
#include "RF24.h"
int msg[1];
RF24 radio(9,10);
const uint64_t pipe = 0xE8E8F0F0E1LL;
int SW1 = 7;
int led = 13;
bool LED_STATE;
 
void setup(void){
  Serial.begin(9600);
  radio.begin();
  radio.openWritingPipe(pipe);
  pinMode(led, OUTPUT);
}
 
void loop(void){
  if (digitalRead(SW1) == HIGH){
     msg[0] = 111;
     Serial.println("HIGH");
     LED_STATE=HIGH;
     radio.write(msg, 1);
     delay(10);
  }
  else {
    LED_STATE=LOW;
    Serial.println("LOW");
    msg[0] = 101;
    //radio.write(msg, 1);   // <== IF THIS IS UNCOMMENTED, IT DOESN'T WORK
    delay(10);
  }
  
  digitalWrite(led, LED_STATE);
  
}

This is such an odd bug. Any ideas?

Thanks.

If I try to transmit when the switch is either high or low

What do you mean by this?
How are you debouncing the button?

HugoPT:

If I try to transmit when the switch is either high or low

What do you mean by this?
How are you debouncing the button?

47nf capacitor. I monitor the serial terminal, and I get LOW and HIGH when the switch is changed, so I seriously doubt the problem is in the hardware, especially since if I only have 1 transmit command, it works fine.

Update on the problem:

I figured out one reason why the LED wasn't working correctly -- Pin 13 is the SCK for the SPI bus and also is the pin for the on board LED. That sucks for trying to debug without the serial monitor. Oh, well. I guess I can wire up another LED.