Fix modify empty section

recommended to review per commit.
is `sformat` needed here?