removing a bug in replacements