fix global config override if using as lib