Small threading.Lock mistake