Can you see if you can use `inreplace` instead?