Fixed bug for setTokenClass

Fixed a bug where the program does not set the token class for the
token.

This should be more or less the final edit.