Fix equals and hashcode