Fix update thread to work with UI.