Removed NPE bug in config creation