fixed a bug in hash extraction