Fix small bug when using enter key to finish editing a section.