Fix a problem in single-thread mode where the canvas isn't always updated.