commit/rollback: make sure connection gets closed