Resistive ballooning modes in the second stable regime