fixed debug cursor detection logic