a bit better cursor_exists