fix bug of SH.gen-input