fix up unittest and dist script