fix badly closed code section and formatting