Found bug where hardcoded table index failed (differing line numbers), fixed by searching for <S> tag and incrementing by 1