Be sure to do UI things on the main thread.