fix bug in unsubscribing