Fixed infinte while loop issue and clearing up path nodes