; and (ii) arises out of a failure to carry out the compact or funding agreement; or (B) gross mismanagement with respect to funds transferred to an Indian Tribe under a compact or funding agreement, as determined by the Secretary in consultation with the Inspector General, as appropriate. (2) Prohibition The Secretary shall not reassume operation of a program, in whole or part, unless— (A) the Secretary first provides written notice and a hearing on the record to the Indian Tribe; and (B) the Indian Tribe does not take corrective action to remedy the mismanagement of the funds or programs, or the imminent jeopardy to a trust asset, natural resource, or public health and safety. (3) Exception (A) In general Notwithstanding paragraph (2), the Secretary may, on written notice to the Indian Tribe, immediately reassume operation of a program if— (i) the Secretary makes a finding of imminent and substantial jeopardy and irreparable harm to a trust asset, a natural resource, or the public health and safety caused by an act or omission of the Indian Tribe