fixed a couple of sign comparison warnings on AVR