stronger shear transform to fix some degenerate cases