fix hash generation problems with alignment