fix duplicate publish issue