Fixed indexing bug in the get...Token helper functions.