Fix  fatal error when using config file