Number pad produces strange output in certain commands in Terminal Running OS X 10.10.5 (Yosemite)

Well, something happened to my system (I can honestly say it wasn't me but), I was unable to use the USB keyboard number pad while using commands such as 'less', 'more' (and perhaps 'vim' and 'nano') in the OS X Terminal.  It would type output ESCOq for 1, ESCOr for 2, ESCOs for 3, ..., ESCOp for 0.  When exiting the programs, the USB keyboard number pad would work just fine in the terminal.
Go to Terminal -> Preferences -> Profile -> Advanced, and uncheck 'Allow VT100 application keypad mode'.