Update UI on the main thread.