Fix some bugs on publisher