Fix bugs with asynchronous update