fixed bug with the internal neighbor tracking