Fixes to mode_compute=5. (1) force univariate steps at every iteration: improve robustness at the expenses of a bit less efficiency; (2) fix gradient computation for special cases when the value of the parameters get stacked at the prior boundary.
Merge pull request #557 from rattoma/master

Fixes to mode_compute=5. (1) force univariate steps at every iteration: ...