Remove unused variable
Avoid race conditions