Add code to close connection. Except it's broken so I commented it out.