close cursor after usage