fix postpublish bubug (callback was called twice)