made pubsub factory option optional
fixes