But how did they get into the black ?

By giving over the economy to the IMF and World Bank and thereby agreeing to devaluation, public sector layoffs, tax increases, cutting civil service wages and deregulating the retail prices of basic foods in exchange for loans perhaps ?