Propperly closing connections.