fix distribution detection