Improve generateToken behaviour.

Fix #26 
Can you explain me these two lines please :-)?