fix flow hash function