fix boundary checking agian in hash tables