Fix warnings from the estimate function (This probably has to be modified).