Patch from Thomas Luu for the case where Pearson's approximation goes negative.