fix threadpool when len < pool.length