bug fix (isinstance to issubclass)