Patch to fix several settings bugs.