fix missing cursor close