fixed bug for directory compare