fixes #92. pubsub handles fns on prototype better