Fix timing issues in tests
plug memory leak in read_config logic