wip
wip
two bugs found during avr port