Fixed several windows issues (mostly broken tests)