check if cursor is invalid
Merge branch 'fix/deduction/invalid_cursor'