* fixed several crash / invalid data cases in the hash implementation