small fixes in bootloader code