minor changes to bootloader logic