Fixed some compiler errors in windows