better number detection (fix typo)