fixed pubsub bug that occurs when subscribe is called immediatly after unsubscribe