fix bug causing globalStartIndex == 0 to be confused to globalStartIndex == undefined