Minor fixes to Latex parser