Fix pubsub behavior