Fix config race condition