Bug fix, wait takes care of thread interruption