some dirty fixes for AVR. avr-libc doesn't have .*f syntax or %n in format specifier