ui refresh moved to seperate thread.