Some more fixes to the merge from 4.1 stable.

As configuration settings changed so much, there were many places to fix things.