Changed autopublish, implementing publishing