fixed UI to be thread safe