Correctly allowing connections to be released