Refine the logic of unsubscribing.