Added more stability options

Making sure to close a connection.