fixing flaws in distro check