All right, somebody else helped me.
My error was that I schould have worked with PINB |= (1 << PINB1); //toggle pin9 and PINB |= (1 << PINB2); //toggle pin10 inside the ISR so that the pins go back to their normal state at the end of the cycle.
I tried to access pin 9 and pin 10 directly with digitalWrite, which, obviously, did not work.