fix crash if upgrade rejected (uncaught signal from tcp.js)