fix mistake with cursor passing