fixed mathematical expression ASTs being malformed