fix a bug in generator with params or produces not existing.