iterate array correctly so that random number is actually used in signing
Merge pull request #309 from ryanxcharles/bug/signing

iterate array correctly so that random number is actually used in signing