fixed stackoverflow (infinite loop in several Path calls)