finish linear fold detection