Fix instantiation error in config. Add cnf.clear in tests