fix wrong cursor use