some fixes for publish