(Thread wrapper) Fix unused variable i warning