fix visitable path checking issue