Fixed issue with releasing dta  cursor