#233 fix-prevent prepare_for_firmware_update() from called more than once