fix value copying