- close the connection properly