Fixed bug with duplicated cursors