Fixed attempts to close a connections that didnt exist.