Fixes to both sides. Rehashing should now work