This is the reference causing the error and as soon as it is removed save works properly:
<ref name="c1830">"United States Census, 1830," database with images, FamilySearch (
https://familysearch.org/ark:/61903/1:1:XHPM-LR6 : 7 September 2017), George Helm, Fentress, Tennessee, United States; citing 12, NARA microfilm publication M19, (Washington D.C.: National Archives and Records Administration, n.d.), roll 176; FHL microfilm 24,534.</ref>
'''FOUND PROBLEM IN <ref name=" c1840"/> there was an extra space, worked in preview but not on save'''