Fix bug when no slash in path