copy/replace fixes