Minor fix, checked wrong running bool in thread