Parse decimal and hex numbers correctly.