cleanup for publish