Fixing hash generation issue