fixed missed countDown() call of thread termination counter + code clean up