Fixed some bugs in examples on Windows