fix generate issue