fix countHashGrid