Improved the configuration handling