fix no dir and add distribution mgm