nonlinear bug fix

theta2 was a dataframe, which was screwing things up.
This commit also includes some debugging breakpoints.