isinstance bug fix.