Fixed tests by keeping a thread local of the UI so it doesn't get garbage collected within our test run.