Changes to make it compile for Windows