Fix checkHash()