Text boxes in widget blinking out

I have a widget that’s connected to a machine. That when you open it. It gives you the numbers and so on of any items going threw it. The issue is that I have 2 text boxes on the widget that when the items and count is returned. They blink out. I think it’s from the foreach loop that I use to loop threw the inventory. Any one have any idea what would cause it and a fix for it.