fix directory scan