Bug in threadmanager