Fixed problem with multiple parentheses in latex code