Courts crisis averted; Scott agrees to $19.5 million loan