Fixing a multithreading UI issue.