fixed error witrh not coping array