the thread wasn't getting reset). Somebody with more windows saavy might want to check that this doesn't break other stuff.