cursor: fix out-of-the-world exception

Signed-off-by: mkhropov <mkhropov@gmail.com>