fixed pre_publish