Changed deep copying.