Fix token generation;