Fix UI/Engine mulithreading bugs and fix planner/visualizer bugs