closing open connection.