fixed bug with phantom visited spaces, which was also causing a lot of extra duplicates