Token creation fix