bug fix in genscript