fixes instanceof checking for Array