fixed a bug in getAvailableThreads fot the time beeing a new thread will be created for every element in the list.