fix hex and oct number parsing