fixed segfault, ui was being modified from thread
Merge pull request #1689 from diegosarmentero/master

fixed segfault, ui was being modified from thread