Fix windows code for dll