Fixed bug with negative coefficients.