Further Windows fixes
Test: Adds back stats test.