Fixed some issues with Windows Debug target, and fixed fatal issues with Windows Release target.