Fix bug with generic code edit (fix tests)