CTC toggle

Hi, I’m trying to do CTC toggle mode on Arduino Mega(Atmel 1280).
Currently my LED is connected to pin 11(PB5)

    //PORTB ^= 1<<5;

void setup() {
    //Compare Output Mode, non-PWM
    //Toggle OC1A on compare match
    TCCR1A |= _BV(COM1A0);
    TCCR1B |= _BV(WGM12);   //CTC Mode
    TCCR1B |= _BV(CS10);    //No prescaler
    TIMSK1 |= _BV(OCIE1A);  //Enable timer compare interrupt
    DDRB |= 1<<5;
    OCR1A = 1000;

void loop() {}

Problem is that it’s not working as it’s supposed to. If I comment out PORTB ^= 1<<5 then I can see that it’s working.
Did I miss setting some flag?

Rather than using an ISR to toggle the bit you can use the Timer/Counter OCR1A hardware to toggle the T1A pin (Pin 11, PB5) directly.

"For generating a waveform output in CTC mode, the OCnA output can be set to toggle its logical level on each compare match by setting the Compare Output mode bits to toggle mode (COMnA1:0 = 1). The OCnA value will not be visible on the port pin unless the data direction for the pin is set to output (DDR_OCnA = 1). The waveform generated will have a maximum frequency of fOCnA = fclk_I/O/2 when OCRnA is set to zero (0x0000).

Also, you can toggle a bit in an I/O port by using the PIN register:

PINB = 1 << 5;  // Toggle bit 5 of PORTB