fixing bug in parser with negative coeffs