Banking crises and the design of safety nets