api: Fix regression in token assignment.