fixed numerous structural issues that prevented correct numbering