ui: Improved handling of number extraction from user.