Fixed some bugs in calculation of non-linear estimates.