Fix missing and wrong find_path function