bug fix: avoid infinite recursion on some pathnames
typos in doc