Fix bug with instanceOf.