Actually compiles on windows now (but crashes...)