Multiple bugs with /streams - it's pretty broken

I have a script that repeatedly calls /streams and goes through the list of streams until the viewer count falls below a certain number.

Well, the script often ends prematurely because /streams returns data with faulty viewer counts. The following is a good example of what gets returned.

stream: viewers
riotgames: 22000
voyboy: 16000
trick2g: 12
anniebot: 8000

I feel like it’s trying to show the correct viewer count for trick2g but it cuts off abruptly, leaving only the first two digits.

I feel like all the other bugs I listed are self-explanatory.