Fix equals method.