corrected isinstance calls