fix for crashes on restarting packages which had one of the sql instances loaded