Fixed bug in detecting bootloader on some chips