Fixed bugs due to Visual Studio support.