Fixed error determining the distname