Fixed a bug in HashFunction class.