fixed bugs due to removal of insecure and autopublish