Replaced terminator with min leaf.