fix wrong replaces