fixed hngen script