fix bug with token generator

Benjamin Mako Hill || Want to submit a patch?