Fixed a bug in HasConfig trait