Deal reached for $167 million in Minn. flood relief