Fix readConfig

Fixed readConfig to read global configs in a proper way.