Fixed a bug in getHashCode

Hash codes should be generated correctly now.