This should clear the cursor when the event is set to cancelled, which would prevent the duplication bug.