Fixing SHA1 bug