Fixed tokenizing at end of string