fix generation script