fix stringified undefined used as token