fixes indexer issue where visited wasn't being updated