fix unsubscribe in pubsub

fixed unsubscribe, added test