check node index, not just in debug