Fixed calculation of signatures for version 3.
Merge pull request #7 from karpitsky/master

Fixed calculation of signatures for version 3.