Fixed a type error on the loadConfig function