Unable to cast object of type ‘newtonsoft.json.linq.jobject’ to type ‘system.string

UiPath version: 2016.2.6274
.NET Framework 4.6
OS: Windows Server 2012 R2 Standard

Getting error: Unable to cast object of type ‘newtonsoft.json.linq.jobject’ to type ‘system.string

The error is triggered after try to execute a Close Window activity that’s into a while. The idea is to close all opened windows corresponding to my selector, until there are none. The are times when it does it well, and sometimes it does not. I have this into a try catch already, but my robot is still failing (execution interrupted)… and the exception in the output pane is “Invoke Precall Search: Close Web Browser : The selector is not valid”. Besides de error in the title of this topic which UiPath shows in a message box.

Have anybody experienced this?