Better (but still pretty bad) implementation for updating sections
metadata.