Fix a small bug in str_copy: if more than one variable is replaced, make