Selector working intermittently

I have a workflow that goes through a web page performing searches with predefined set of filters. The bot would loop the different filters and gather total number of results and some other data. When the search yields no data, there’s a pop up stating that, and an OK button that the bot needs to click. It works just fine in my development desktop (where Studio is) but on the target environment the selector sometimes works and sometimes doesn’t work because couldn’t find the UI element.

What’s odd about this is that this behavior only happens on the target machine (a Citrix box) and it faults at a point where the current execution already passed and worked!

How can I bullet proof a selector? How can I troubleshoot this!