Fixed bug refresh in UI thread.