Use type(self) instead of self.__class__