Fix namespace issue with instanceof operator