Bug fix on dist check