Fixes for prehash matching