updated patch for isPrototypeOf