Fix to check hash