Handled a new case for dir_namev
Some minor changes