Fix generate error and dump version