Suspicious instanceOf test change

As noted in ACT-2061 the instanceof test at line 59 doesn't make sense.  I've changed it to what I believe is the correct variable.

Please review and make sure that I am correct.

Thanks