Those who are hiring almost always focus on finding that needle-in-the-haystack candidate—a top performer who is also a cultural fit.

But that search method is flawed. Avoiding the opposite sort of worker—the toxic employee—should be the priority.

A new working paper from Harvard Business School examined data on 50,000 workers across 11 different firms and found that avoiding a toxic worker generates double the returns compared to those delivered by workers who are part of the top 1% of productivity.

“This suggests more broadly,” the paper says, “that ‘bad’ workers may have a stronger effect on the firm than ‘good’ workers.'”

The paper, which was published by Dylan Minor, a visiting assistant professor at Harvard Business School, and Michael Housman, a workplace scientist in residence at analytics firm HiQ Labs, defines a toxic worker as someone who “engages in behavior that is harmful to an organization, including either its property or people.” That behavior can be relatively harmless and simply indicate that the worker is a bad fit, prompting premature termination and a search for a new worker. But at the other extreme, such misconduct can cost a company billions of dollars, as in the case of JPMorgan’s London Whale. And in the very worst circumstances, toxic workers can be violent and harm their colleagues.

But even the most mundane behavior by a toxic worker is bad news for a company. It can “cause major organizational cost, including customer loss, loss of employee morale, increased turnover [of other employees], and loss of legitimacy among important external stakeholders,” according to the paper.

Based on the cost of replacing other workers who quit due to a toxic employee, bad apples in the workplace can cost $12,489, and that doesn’t include potential expenses from litigation, regulatory penalties, or reduced employee morale. Compare that to the value a worker in the top 1% of productivity brings to a company by doing more work than the average employee—$5,303.

“[A]voiding a toxic worker (or converting them to an average worker) provides more benefit than finding and retaining a superstar,” the paper says. “Assuming that it is no more costly to avoid a toxic worker (or replace them with an average worker) than it is to find, hire, and retain a superstar, it is also more profitable to do the former over the latter.”

But how exactly does a company avoid hiring such duds? The paper has pinpointed personality traits of people who are more likely to be terminated for toxic behavior: those who are over-confident, self-regarding, and profess to follow the rules.

While those clues may stop a company from hiring a toxic worker in the first place, if a bad employee manages to land a job, the process of getting rid of him is trickier. That’s because toxic workers actually tend to be more productive than their peers. “This could explain why toxic workers are selected and are able to remain in an organization for as long as they do,” the paper says. “For example, an investment bank with a rogue trader who is making the firm millions in profits might be tempted to look the other way when the trader is found to be overstepping the legal boundaries.”