fixed generate error