Changed off by one error in token parsing