Managing the real and fiscal effects of banking crises