Fixed subclass check