Fix publish. Improvements and fixes.