Fixed some bugs to run on Win7 system with an Amd gpu.