AVR related fixes
more AVR related fixes