fix error in cursor.