fix publish from preview mode