Make hashCode compatible with equals