updated to fix connection override if it was closed somehow