Close cursor during __exit__; #18