(Hopefully) fixed some Windows bugs