Fixed the Thread-stuff