Various minor fixes in the publish process