clean up connections a little more consistently (closes #715)