fixed avr compilation issues