close cursor and stopself