Fix modify empty section

recommended to review per commit.
in both cases I do not want to break it as sformat format values passed slightly different then `#{}` from ruby. For simple cases it works fine, but e.g. for maps or lists it works slightly different so I really want to make only refactoring, no changes in functionality.