The World Health Organization (WHO) was harshly criticized for its lackadaisical response in 2014 to the Ebola epidemic, which went on to kill more than 11,000 people and caused global panic. But less than a year after acknowledging its failures, the organization has reformed itself.

With the Zika virus epidemic spreading explosively across the globe, the WHO seems to be doing the right things. There is much we still don’t know about Zika and how to stop it, but the WHO’s response to the crisis has been remarkable. It shows how simple but crucial principles of crisis management can be applied at a massive scale.

Be prepared

The first principle of managing a crisis is to be prepared. In a report analyzing the failed response to Ebola, a group of leading public-health experts concluded that “the most egregious failure was by the WHO in the delay in sounding the alarm.”

It took nine months from the beginning of the outbreak for the organization to declare a global public-health emergency, during which time it ignored and even downplayed warnings from other health agencies and its own experts about the pace at which the virus was spreading across West Africa. That scathing criticism forced the WHO to accept its failure publicly.

“The global response to Zika has been much better than it was to Ebola,” Jimmy Whitworth, an infectious-disease expert at the London School of Hygiene and Tropical Medicine, told Quartz. “This is in part because of WHO’s reforms.”

This time around, the WHO declared a public-health emergency on Feb. 1, despite there still being many unknowns. Though this announcement too came nine months after the outbreak began, experts believe that in the case of Zika, that’s early enough that a global response could be effective.

This is because, though Zika spreads much faster than Ebola, it’s mostly benign in adults. As many as four in five of those infected show no symptoms. Others suffer from rashes, fever, or joint pain, but quickly recover.

More recently, of course, it’s also been blamed for far worse problems: a steep rise in cases of microcephaly, where newborns have tragically small brains, and of Guillain-Barré syndrome (GBS), which causes paralysis in adults. But assuming those effects are real (which is still unclear), they still account for only a tiny proportion of Zika infections—whereas Ebola kills half of its victims on average.

Most importantly, the WHO’s declaration of a global health emergency came just four months after the link with microcephaly was first mooted—which was the first time anyone realized the disease might cause something worse than rashes and fevers.

Reuters/Nacho Doce Jackeline, 30, feeds her son Gustavo Henrique, who is two months old and was born with microcephaly.

“The Zika outbreak has been a highly visual global health crisis,” Joshua Greenberg, an expert in risk communication at Carleton University, told Quartz. “Those images of babies born with severe birth defects helped create the conditions under which an emergency committee had to be convened.”

The WHO’s new emergency program includes an incident-management system, which helps it work across its own departments and regional partners much more quickly. On Feb. 16, the WHO used this system to launch a comprehensive new report that details how the world can fight Zika over the next six months.

Fight the fear of the unknown

The second principle of managing a crisis is to communicate clearly. During the Ebola epidemic, even as the WHO downplayed the risk of Ebola, it didn’t effectively communicate two key things that would have helped with prevention: that the virus only spreads from person to person through bodily fluids, and that it spreads relatively slowly because it’s less virulent and more lethal than most known viruses.

In case of Zika, by contrast, very little was known about the virus. Because previous epidemics hadn’t shown any signs of a connection to microcephaly or Guillain-Barré, it hadn’t received much attention. Uncertainty is often used as an excuse to not communicate risks, Greenberg says; and even when there is communication, the advice tends to be weaker or even conflicting.

But learning from its mistakes in Ebola, the Pan-American Health Organization (PAHO), a regional office of the WHO, was quick to alert headquarters when the number of microcephaly cases started rising, despite there being no proven link. That is winning it praise from experts.

“The WHO’s skillful embrace of uncertainty and the emergency committee’s adherence to transparency in accounting for how it reached the decision to recommend a public-health emergency declaration, represents a new high standard in risk communication,” Greenberg writes.

“PAHO has been exemplary in its support during the Zika epidemic,” Laura Rodrigues, professor of infectious disease epidemiology at the London School of Hygiene and Tropical Medicine, told Quartz from Recife, where Brazil’s outbreak began. “They’ve been involved since the very beginning with the Brazilian government in communicating the risks and working on strategies to counter Zika.”

Reuters/Paul Hanna A health worker wearing a protective suit stands at a window in the isolation ward of the Carlos III hospital in Madrid.

“WHO hasn’t confirmed the causal link to microcephaly, but it’s working under the assumption that there is one,” Whitworth told Quartz. “So the only things that will change if the causal link is established is that WHO will be in a stronger position to ask for funding and push the research agenda.”

Of course, such scientific uncertainty leaves scope for troublemakers to hijack the conversation. The most recent conspiracy theory, for instance, is that it may not be the Zika virus that is causing microcephaly, but a chemical used to kill mosquito larvae.

“Communicating uncertainty often undermines perceived expertise,” writes Lisa Rosenbaum in the New England Journal of Medicine. “But if you don’t communicate uncertainty and end up being wrong, you risk losing even more credibility.”

Clear communication in the Zika outbreak has allowed the WHO to avoid another failure. During the Ebola outbreak, many countries limited travel and trade to affected regions, further crippling the already poor economies. Many groups have called for similar restrictions on Zika-affected regions. The WHO’s transparent communications have enabled countries to not pander to such requests.

Nothing happens without money

The third principle of managing a crisis is to use resources well. The money to fight Ebola came late. It was more luck than anything that by that time, the disease had begun to come under control.

This failure prompted the WHO to establish a $100 million contingency fund. The fund is already being use to finance the WHO’s initial fight against Zika.

Raising the alarm early also helped the WHO grab the attention of world leaders. On Feb. 8, for instance, US president Barack Obama asked Congress for $1.8 billion to fund research on vaccines and provide foreign aid to Zika-affected regions. (On Feb. 18, Congress said no, but Obama has said he’ll keep pushing.)

Reuters/Ueslei Marcelino Rosana Vieira Alves holds her 4-month-old daughter Luana Vieira, who was born with microcephaly.

Apart from money, the greatest resource in fighting an epidemic is data. During the Ebola scare, there was no global framework for sharing epidemiological, genomic, and clinical data among researchers and governmental agencies.

Now the WHO is putting such a mechanism in place. It involves creating standards for record-keeping of surveillance and diagnostic data, which can help ensure that health data can work across borders. It will also setup a repository for easy access to such data.

This kind of leadership is having a broader impact. On Feb. 10, some of the most influential scientific journals and health-research funding bodies pledged to make any Zika-related data freely and readily available to the public. This should address two big problems in scientific publishing. The norm today is that data used for a study are not published until the study has gone through weeks or even months of scrutiny. And, often, even after the study comes out, it is hidden behind expensive paywalls, effectively cutting off public access to those studies.

“This kind of data-sharing should, of course, be the norm [during health emergencies],” Greenberg told Quartz. ”But we know that too often geopolitical interests and economic pressures intervene to shape the scientific response.”

But you also need luck

Of course, the WHO cannot take all the credit for the global response to Zika. Small factors could have tipped the balance. For instance, if instead of Brazil, the outbreak had begun in a much poorer country, such as those in West Africa, or a poorer and bigger one—Indonesia or India—the WHO’s leadership alone might not have sufficed.

“Public-health services and funding for research is much higher in Brazil than in West Africa,” Whitworth told Quartz. “Undoubtedly that helped in having a better response, because the WHO had a stronger partner.”

Indeed, things could yet get worse. With Brazil’s mosquito season in full force and the northern hemisphere’s mosquito season due to begin before long, the disease might start to spread even more aggressively.

Nevertheless, it’s remarkable how fast a big bureaucracy like the WHO has turned itself around. Almost all the improvements in the WHO’s capacity for dealing with outbreaks were made in the few months between the tail-end of the Ebola epidemic and the explosive start of the Zika outbreak.

Ebola is not over yet, Zika hasn’t reached its peak, and soon there will be another epidemic. Our globalized world has created an excellent breeding ground for contagions to spread. Climate change is only making matters worse. So it’s reassuring that there is now at least one global institution that can be trusted to respond effectively.