Fix environment in-place editing