If factors such as exchange-rate policies had helped to precipitate the financial crisis, above all it was excessive and poorly supervised foreign borrowing that made it so disastrous. As it became too expensive to fend off speculators, currencies were forced to float. This resulted in large falls in the baht, the won and the rupiah against the US dollar. For instance, from an average of Rp2,342 to the US dollar in 1996, the rupiah fell to an average of Rp10,014 in 1998. As a result, companies that had received large unhedged foreign-currency loans now faced impossibly high debt repayments in domestic-currency terms. The panicked capital flight that ensued only exacerbated the currency depreciation, leaving indebted companies in even direr straits. The workout of the bad debts and disposal of the distressed assets created by the crisis was one of the major tasks for policymakers for several years thereafter.