fix bug about generate enum