Fixed Windows compilation errors