fix updating UI in event dispach thread