fix bug on cursors