Fix invisible class bug