Bug fix of publish