fix bug in generate folder.