Fixed a crash on updating view model.