Fix bugs in PublisherObserver.java