Mel Gibson cuts a deal