Fixes to prehash.