Fix error in publish task.