change order of preview and publish.