Fix bugs in integer and decimal parsing.