Fixing hashCode NPE