Fixed bug when searching multiple paths;