Fixed random token generation bug