fixed makepublish completely, added some options