test fixes
fix for bad instanceof checks