fix a directory path / caused index match error