explicitly close cursor