fix generation process