Fixed crash when cache job throws and exception.