[fixed] added boundaries for number of threads