bit more robust version detection