Fixed confing loading code