Fixed Problem with Threads