Fixed crash when user would type an invalid number for the /history command.