Bug fixes.

4 jobs for now_DescentMinimizer_and_bugfix in 5 minutes and 44 seconds (queued for 2 minutes and 47 seconds)