Fixed add_section function