Fix bug with open/closing sections