Fix equal method.
Verify equals and hascode contract.