Fixed pubsub for use with BytesEncoder. Thanks to denya <denya.msk AT gmail.com>.