Fix problem with hash creation