Fix hash checking