fixed thrown error in path apply