fix for MSVC's stupid max macro