correcting some weirdness in platform detection