Fixed avr issues