Move position of the configuration loading to fix a NPE