Correctly compute hash values (inc using correct sizes)