Fixed a bug in config handling