some Visual C++ fixes