Fixed issue where empty query is attached to publish URLs