fixed generateSig method functionality