fixed directory parsing issues