[fix] fixed the problem with sub generators called multiple times