Modify publish script to avoid small issue and remove debugging