Missed to close the connection in copy constructor and assignment operator.