close cursors after using them