fixed bug hashing invalid reference