Fix bug in case of using other hash function (sha256, sha512)