fix parameter copy in Mutate and tests