Fix replacement issues.