some MSCC++ fixes (incomplete)