fix in main for latex output