Improper handling of cursor removal