Fix equals with replacement