Fix startIndex to increment by 1 instead of 5