fixed issues #655, #650, #645,
Merge pull request #657 from safiyu/hashing

fixed issues #655, #650, #645,