Fixed issue

Fixed Id navigation bug. Sometimes tree search would end prematurely
giving either incorrect tree or nullPointerOutOfBoundsException