bug fix for sh geneator...