pubsub: fix bug introdiced in last commit