fixed the bug that was not parsing the math expressions correctly