Cleanup for publish