changing order of c->border restorage