fixed directory parsing issue