Fix subclass handling