fixed problem in medium traversing that replaces multiple NP in same question