Fix class adding.