bug fix concerning updating the ui thread