was not properly traversing links for both minList and stackList