Fix config error and fix code example snippet. Closes #845