Fix class output assignment issue