fixed bug parsing input with negative exponents