Fix publish/unpublish