Fix a bug in block generator.

fix embedding problems