Fix to publish script