Update kb_threads.py

Helps to increment the exit loop