Mega 2560 analogWrite() not functioning

I can't get analogWrite to work on my Mega and I am wondering if someone could give me some guidance to see if its actually setting the registers correctly or something.

I have leds on pins 5-8 and it is only full ON if I set the value X = 255 any other value 0-254 and the led is just off.

If I use delays I can get a full range of dimming, but this isn't going to work for my project.

void setup() {
  pinMode(8, OUTPUT);
  analogWrite(8, 0);  
}

void loop () {
  analogWrite(8, X);
}

Thoughts?

I am so, sorry. Can someone delete this... I upgraded my IDE and now everything is working.