Fixed a problem with passing name to subclass [skip ci].