Corrected edge case where off() is called before on() callbacks complete, causing events to trigger which should be cancelled.