fixed 2 problems with john's code: publish_path shouldn't be used, and the