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