Added workarounds for MSVC6