Bugfix: take max value of returned pvalues - solving a quadratic, you
can't enxure you are picking the right value otherwise.