Fix class mutation issue