Fixed an isinstance bug.