fix to class bug