code fix for compiling on Windows