fixed small issues with the residual and stochastic analysis