cursor can be undefined