fixed bug in publish script