Fix problem with hash generation