Legal institutions and fragile financial markets