Fix cooperative scheduling for AVR