Fixed a crash when the update fails