Fixed the isinstance error.