fix the crash issue of ui update