fix hash search, sometimes returns error