fixed parsing of fractions