Fix stupid mistake in path searching