Fix bug in publish.