Fix "TypeError: unorderable types: ABCMeta() < ABCMeta()"