fix version detection if not set / invalid