AVR compatibility, fixing bugs