Fixed threads not running when started from the GUI