tidies a few latex errors