Bug fixes to Peter Thatcher's html2latex perl script