Fix loading config bug