[hash] fix two bug
[hash] add test