fix shallow dup problem