fix bug removing non-existent connection