fixed a problem in genchildren