fixed instanceof call