Credit market competition and liquidity crises