added fix to GetPath indexing