Remove useless function call in bootloader and fix some bugs.
Bootloader call from app still needs to be fixed.