fixing issue with parsing unary operations near the end of the expression.