Fix Thread Problem