update version and fix some logic in doc gen