Fix modify empty section

recommended to review per commit.
@wfeldt we've recently touched on this subject in linuxrc. Do you know of cases where this could be a problem?