fix stupid mistake of not discarding path once it has been followed