A surgical device has a jaw assembly with a first jaw and a second jaw, a pivoting linkage, and a camming assembly configured to pivot the jaw assembly. A cam slot having a first portion, a second portion, and a third portion may have a Y shaped configuration. A flexible shaft allows further pivoting of the jaw assembly.