fix class bug