Added check for whether class is being changed