fix token context error reporting