Fix `inreplace` operation