fixed bug when getting node from an index that does not exist yet