AVR related fixes