fixed URL conversion in save (and cleanup publish)