bug fix for token visualization