modified to stop autopublish