fix some issues on copies for array for dbref