Fix in-place editing functions in convert.c