fix directory support